home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
ViewIt™ 2.24 Shareware
/
FORTRAN Demo Projects
/
Absoft MacFortran II 3.2 Demos
/
TutorialAF.f
< prev
next >
Wrap
Text File
|
1993-07-08
|
2KB
|
68 lines
C NOTE: Read the "MPW Fortrans" section of "About Compilers"
C before compiling AF programs that use FaceWare modules.
C Tutorial AF Demonstration Program
C ©FaceWare 1993. All Rights Reserved.
GLOBAL DEFINE
include "Types.inc"
include "QuickDraw.inc"
include "Controls.inc"
include "Events.inc"
include "OSUtils.inc"
include "OSEvents.inc"
include "SegLoad.inc"
include "Files.inc"
include "Resources.inc"
include "FaceStorAF.inc"
END
include "FaceProcAF.inc"
PROGRAM TutorialAF
implicit none
record /FaceRec/ fRec
common/FaceStuff/fRec
integer*2 theFlag,theListItem,theMenuItem
character*32 theString
fRec.uName = 'Tutorial.Rsrc'
call FaceIt(0,DoInit,0,0,0,0)
theFlag = 0
theListItem = 3
theMenuItem = 2
theString = 'Hello'
do while (.true.)
call FaceIt(0,DoLoop,0,0,0,0)
if ((fRec.uMenuID == 105).and.(fRec.uMenuItem == 1)) then
call FaceIt(0,NewWnd,1010,0,0,0)
call FaceIt(0,GetCtl,1010,0,1,3)
call FaceIt(0,LnkCtl,fRec.cControl,%loc(theFlag),2,0)
call FaceIt(0,GetCtl,1010,0,1,4)
call FaceIt(0,LnkCtl,fRec.cControl,%loc(theString),-31,0)
call FaceIt(0,GetCtl,1010,0,1,5)
call FaceIt(0,LnkCtl,fRec.cControl,%loc(theListItem),2,0)
call FaceIt(0,GetCtl,1010,0,1,6)
call FaceIt(0,LnkCtl,fRec.cControl,%loc(theMenuItem),2,0)
call FaceIt(0,SetVal,1010,0,0,0)
do while (.true.)
call FaceIt(0,MdlWnd,1010,0,0,0)
if (fRec.uMenuID == 1010) then
if (fRec.wcHit == -1) then
exit
else if (fRec.wcHit == 1) then
call FaceIt(0,GetVal,1010,0,0,0)
exit
else if (fRec.wcHit == 2) then
call FaceIt(0,GetCtl,1010,0,1,8)
fRec.uString = 'Run button was hit.'
call FaceIt(fRec.cControl,1565,2,0,0,0)
end if
end if
end do
call FaceIt(0,EndWnd,1010,0,0,0)
end if
end do
end